home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / devnag.zip / DNMACS.TEX < prev    next >
Text File  |  1991-05-09  |  4KB  |  108 lines

  1. %    DNMACS.TEX
  2. %    TeX macros for the use of Devanagari fonts
  3. %    Copyright (C) 1991  University of Groningen, The Netherlands
  4. %
  5. %    Author:   Frans J. Velthuis
  6. %    Internet: velthuis@rc.rug.nl
  7. %    Bitnet:   velthuis@hgrrug5
  8. %
  9. %    This program is free software; you can redistribute it and/or modify
  10. %    it under the terms of the GNU General Public License as published by
  11. %    the Free Software Foundation; either version 1, or (at your option)
  12. %    any later version.
  13. %
  14. %    This program is distributed in the hope that it will be useful,
  15. %    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. %    GNU General Public License for more details.
  18. %
  19. %    You should have received a copy of the GNU General Public License
  20. %    along with this program; if not, write to the Free Software
  21. %    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. %
  23. \font\smalldn=dvng8
  24. \font\ninedn=dvng9
  25. \font\dvng=dvng10
  26. \font\halfdn=dvng10 scaled\magstephalf
  27. \font\bigdn=dvng10 scaled\magstep1
  28. \font\largedn=dvng10 scaled\magstep2
  29. \font\hugedn=dvng10 scaled\magstep3
  30. \hyphenchar\smalldn=-1
  31. \hyphenchar\ninedn=-1
  32. \hyphenchar\dvng=-1
  33. \hyphenchar\halfdn=-1
  34. \hyphenchar\bigdn=-1
  35. \hyphenchar\largedn=-1
  36. \hyphenchar\hugedn=-1
  37. \font\smallcr=cmr8
  38. \font\ninecr=cmr9
  39. \font\halfcr=cmr10 scaled\magstephalf
  40. \font\bigcr=cmr10 scaled\magstep1
  41. \font\largecr=cmr10 scaled\magstep2
  42. \font\hugecr=cmr10 scaled\magstep3
  43. \let\rsize=\rm
  44. \newcount\chnum
  45. \newdimen\itdim
  46. \newdimen\dnblskip
  47. \newif\ifdnmode
  48. \chnum=0
  49. \loop\catcode\chnum=11
  50. \ifnum\chnum<12\advance\chnum by1
  51. \repeat
  52. \chnum=14
  53. \loop\catcode\chnum=11
  54. \ifnum\chnum<31\advance\chnum by1
  55. \repeat
  56. \catcode127=11
  57. \def\subscr#1{\/\itdim=\lastkern
  58. \unkern\kern-\itdim \lower\dp0 \hbox to\itdim{#1\hfil}}
  59. \def\dnsmall{\let\pdn=\smalldn\let\rsize=\smallcr%
  60. \dnblskip=12pt\ifdnmode\dn\fi}
  61. \def\dnnine{\let\pdn=\ninedn\let\rsize=\ninecr%
  62. \dnblskip=13pt\ifdnmode\dn\fi}
  63. \def\dnnormal{\let\pdn=\dvng\let\rsize=\rm%
  64. \dnblskip=15pt\ifdnmode\dn\fi}
  65. \def\dnhalf{\let\pdn=\halfdn\let\rsize=\halfcr%
  66. \dnblskip=16pt\ifdnmode\dn\fi}
  67. \def\dnbig{\let\pdn=\bigdn\let\rsize=\bigcr%
  68. \dnblskip=18pt\ifdnmode\dn\fi}
  69. \def\dnlarge{\let\pdn=\largedn\let\rsize=\largecr%
  70. \dnblskip=22pt\ifdnmode\dn\fi}
  71. \def\dnhuge{\let\pdn=\hugedn\let\rsize=\hugecr%
  72. \dnblskip=26pt\ifdnmode\dn\fi}
  73. \def\dn{\dnmodetrue\pdn\baselineskip=\dnblskip
  74. \tolerance=10000
  75. \pretolerance=10000}
  76. \def\0{\llap{\char13}}
  77. \def\1{\llap{\char32}}
  78. \def\2{\llap{\char92}}
  79. \def\3#1w{{\char"#1}}
  80. \def\4{\llap{\char123}}
  81. \def\5{\llap{\char125}}
  82. \def\6#1{\setbox0=\hbox{#1}#1\subscr{\char126}}
  83. \def\7#1{\setbox0=\hbox{#1}#1\subscr{\char0}}
  84. \def\8#1{\setbox0=\hbox{#1}#1\subscr{\char1}}
  85. \def\9#1{\setbox0=\hbox{#1}#1\subscr{\char2}}
  86. \def\qa#1#2{\setbox0=\hbox{#1}#1\subscr{\char253\kern1.5ex\lower1.25ex
  87. \hbox{\char#2}\kern-1.5ex}}
  88. \def\qb#1{\setbox0=\hbox{#1}#1\subscr{\char253}}
  89. \def\qq#1{\setbox0=\hbox{#1}#1\subscr{\char94}}
  90. \def\qx#1{\setbox0=\hbox{#1}#1\subscr{\char14}}
  91. \def\qy#1{\setbox0=\hbox{#1}#1\subscr{\char31}}
  92. \def\qz#1{\setbox0=\hbox{#1}#1\subscr{\char124}}
  93. \def\qva{\kern0.5ex\2\kern-0.5ex}
  94. \def\qvb{\kern1ex\0\kern-1ex}
  95. \def\qvc{\kern1ex\rdt\kern-1ex}
  96. \def\?{\llap{\char3}}
  97. \def\<{\llap{\char4}}
  98. \def\rs{\rsize\thinspace}
  99. \let\re=\thinspace
  100. \def\rdt{\llap{\char19}}
  101. \def\dnnum{\let\nstyle=d}
  102. \def\cmnum{\let\nstyle=r}
  103. \cmnum
  104. \def\rn#1{\if\nstyle r{\rsize #1}\else#1\fi}
  105. \let\pdn=\dvng
  106. \dnblskip=15pt
  107.